package com.cnhis.cloudhealth.clinical.clidoctor.doctoradviceinfo.bo;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.cnhis.cloudhealth.commons.util.DateUtil;
import org.apache.commons.collections.MapUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.cnhis.cloudhealth.clinical.clidoctor.cliparamter.dao.CliParamterDao;
import com.cnhis.cloudhealth.clinical.clidoctor.doctoradviceinfo.dao.DoctorAdviceInfoDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.DateUtils;
import com.cnhis.cloudhealth.commons.utils.Page;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;
@SuppressWarnings("rawtypes")
@Service
public class DoctorAdviceInfoBo {
	@Resource
	private DoctorAdviceInfoDao doctorAdviceInfoDao;
	@Resource
	private CliParamterDao cliParamterDao;
	
	Logger log = Logger.getLogger(DoctorAdviceInfoBo.class);
	public ModelVo patientDoctorAdviceInfo(Map map,int currentPage,int pageSize)throws Exception{
		ModelVo mo = new ModelVo();
		Page pg = null;
		try {
			pg =doctorAdviceInfoDao.patientDoctorAdviceInfo(map, currentPage, pageSize);
		} catch (Exception e) {
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(pg.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setTotal(pg.getTotalNumber());
		mo.setRows(pg.getList());
		return mo;
	}
	
	@SuppressWarnings("unchecked")
	public ModelVo getPatientsDoctorAdvice(Map map) throws Exception{
		ModelVo mo = new ModelVo();
		String value=null;
		try {
			map.put("productId", 100);
			map.put("programId",105002);
			map.put("paramNo",233);
			value=cliParamterDao.getSysParamValue(map);
			map.put("lParaV",value==null||"".equals(value)?"0":value);
			map.put("productId", 100);
			map.put("programId",105003);
			map.put("paramNo",262);
			value=cliParamterDao.getSysParamValue(map);
			map.put("lPara262",value==null||"".equals(value)?"0":value);
			String date1 = MapUtils.getString(map,"date1");
			String date2 = MapUtils.getString(map,"date2");
			int range = DateUtil.timeRange(date1,date2);
			List list = new ArrayList();
			if(range==1){
				list =doctorAdviceInfoDao.getPatientsDoctorAdvice(map);
			}else{
				list =doctorAdviceInfoDao.getPatientsDoctorAdvice1(map);
			}

			
	        List<Map> cbm01List = new ArrayList<>();
	        List<String> cbm01s = new ArrayList<String>();
	        for(Map temp : (List<Map>)list)
	        {
	            String cbm01 = temp.get("cbm01").toString();
	            String bda01 = temp.get("bda01").toString();
	            String cbm07 = temp.get("cbm07").toString();
	            Map map2 = new HashMap<>();
	            if (!cbm01s.contains(cbm01))
	            {
	                map2.put("cbm01", cbm01);
	                map2.put("bda01", bda01);
	                map2.put("cbm07", cbm07);
	                cbm01s.add(cbm01);
	                cbm01List.add(map2);
	            }
	        }
	        mo.setList(list);
	        mo.setResult(StaticKeys.OH_SUCCESS);
	        mo.setRows(cbm01List);
	        return mo;
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
	}
	public ModelVo checkPatientDoctorAdvice(Map map)throws Exception{
		
		ModelVo mo = new ModelVo();
		List list = new ArrayList<>();
		try {
			list=doctorAdviceInfoDao.checkOutPatientDoctorAdvice(map);
			
		} catch (Exception e) {
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setList(list);
		return mo;
	}
	
	
	public ModelVo checkPatientCancellationDoctorAdvice(Map map,int currentPage,int pageSize)throws Exception{
		ModelVo mo = new ModelVo();
		Page pg = null;
		try {
			pg =doctorAdviceInfoDao.checkPatientCancellationDoctorAdvice(map, currentPage, pageSize);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(pg.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setTotal(pg.getTotalNumber());
		mo.setRows(pg.getList());
		return mo;
	}
	
	public ModelVo valuationDoctorAdvice(Map map,int currentPage,int pageSize)throws Exception{
		ModelVo mo = new ModelVo();
		Page pg = null;
		try {
			if("1".equals(map.get("acf01").toString())){
				pg=doctorAdviceInfoDao.valuationDoctorAdvice(map, currentPage, pageSize);
				
			}else{
				pg = doctorAdviceInfoDao.hospitalValuationDoctorAdvice(map, currentPage, pageSize);
			}
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(pg.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setTotal(pg.getTotalNumber());
		mo.setRows(pg.getList());
		return mo;
	}

    
    public ModelVo returnPremiumDoctorAdvice(Map map,int currentPage,int pageSize)throws Exception{
    	ModelVo mo = new ModelVo();
		Page pg = null;
		try {
		pg = doctorAdviceInfoDao.returnPremiumDoctorAdvice(map, currentPage, pageSize);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(pg.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setTotal(pg.getTotalNumber());
		mo.setRows(pg.getList());
		return mo;
    }
    
    public ModelVo getDoctorAdviceType(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
		List list = null;
		try {
		  list = doctorAdviceInfoDao.getDoctorAdviceType(map);
		} catch (Exception e) {
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		
		mo.setRows(list);
		return mo;
    }
    
    public ModelVo getDoctorAdvicePrescriptionNature()throws Exception{
    	ModelVo mo = new ModelVo();
		List list = null;
		try {
		  list = doctorAdviceInfoDao.getDoctorAdvicePrescriptionNature();
		} catch (Exception e) {
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		
		mo.setRows(list);
		return mo;
    }
    public ModelVo doctorDiagnosis(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			if("1".equals(map.get("acf01").toString())){
	    		list = doctorAdviceInfoDao.clinicalDoctorDiagnosis(map);
	    	}else{
	    		list = doctorAdviceInfoDao.hospitalDoctorDiagnosis(map);
	    	}
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    	
    }
    @SuppressWarnings("unchecked")
	public ModelVo patientSuccessiveDoctorAdviceRecord(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
		try {
			
			String value=cliParamterDao.getSysParamValue(map);
			map.put("para233", value);
    		List list  = doctorAdviceInfoDao.patientSuccessiveDoctorAdviceRecord(map);
    		mo.setList(list);
            mo.setResult(StaticKeys.OH_SUCCESS);
            return mo;
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
    }
    public ModelVo getPatientConsultContent(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getPatientConsultContent(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo medicalItemType(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			String value=cliParamterDao.getSysParamValue(map);
			map.put("aParam", value);
			list = doctorAdviceInfoDao.medicalItemType(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    	
    }
    public ModelVo doctorAdvicePrescriptionProperty(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getCMB01(map);
			if(list!=null&&list.size()>0){
				list = doctorAdviceInfoDao.doctorAdvicePrescriptionProperty(map);
			}else{
				list = doctorAdviceInfoDao.doctorAdvicePrescriptionPropertyFull(map);
			}
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo doctorAdviceDetail(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
		try {
			
				List list = doctorAdviceInfoDao.doctorAdviceDetail(map);
				mo.setList(list);
				mo.setResult(StaticKeys.OH_SUCCESS);
				return mo;
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
    }
    public ModelVo sendAdviceHistory(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
		try {
				List list = doctorAdviceInfoDao.sendAdviceHistory(map);
				mo.setList(list);
				mo.setResult(StaticKeys.OH_SUCCESS);
				return mo;
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
    }
    public ModelVo queryOperationScheduled(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
		
			list = doctorAdviceInfoDao.queryOperationScheduled(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    @SuppressWarnings("unchecked")
	public ModelVo  queryDoctorAdvicePriceContent(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
		     Map m = getBBY01AndBCK01B(map);
		     map.put("BBY01", (m==null|| m.get("BBY01")==null||"".equals(m.get("BBY01")))?0:Integer.parseInt(m.get("BBY01").toString()));
		     map.put("BCK01B", (m==null||m.get("BCK01B")==null||"".equals(m.get("BCK01B")))?0:Integer.parseInt(m.get("BCK01B").toString()));
		     Float f = getBBY25(map);
		     map.put("BBY25", f==null?0:f);
			list = doctorAdviceInfoDao.queryDoctorAdvicePriceContent(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    
    private Map getBBY01AndBCK01B(Map map)throws Exception{
    	return doctorAdviceInfoDao.getBBY01AndBCK01B(map);
    }
    
    private Float getBBY25(Map map)throws Exception{
    	return doctorAdviceInfoDao.getBBY25(map);
    }
    private String getABC02(Map map)throws Exception{
    	return doctorAdviceInfoDao.getABC02(map);
    }
    public ModelVo doctorAdviceExecuteProperty(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
		
			list = doctorAdviceInfoDao.doctorAdviceExecuteProperty(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo doctorAdvicePriceInfo(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
		   // String value = doctorAdviceInfoDao.getABC02(map);
//		    map.put("ABC02", value);
			list = doctorAdviceInfoDao.doctorAdvicePriceInfo(map);
			mo.setList(list);
			mo.setRows(list);
			mo.setResult(StaticKeys.OH_SUCCESS);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo medicalType(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
		    
			list = doctorAdviceInfoDao.medicalType(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    @SuppressWarnings("unchecked")
	public ModelVo inspectionAdviceFeeDetail(Map map)throws Exception{
        long l1 = System.currentTimeMillis();
    	ModelVo mo = new ModelVo();
    	List list = null;
    	String ABC02="";
		try {
		    if("1".equals(map.get("ACF01").toString())){
		    	ABC02=doctorAdviceInfoDao.paramABC02(map);
		    }else{
		    	ABC02 = doctorAdviceInfoDao.paramABC021(map);
		    }
		    String aDate = map.get("aDate").toString()+" 23:59:59.999";
		    map.put("aDate", aDate);
			map.put("ABC02", ABC02);
			list = doctorAdviceInfoDao.inspectionAdviceFeeDetail(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		long l2 = System.currentTimeMillis();
		log.info("----------------------其它类型智慧医保服务耗时："+(l2-l1)+"毫秒-----------------------");
		return mo;
    }
    public ModelVo  adviceBusinessScope(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.adviceBusinessScope(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo getBarCode(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getBarCode(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo hasInspectionBody(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.hasInspectionBody(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo getCheckBodyById(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getCheckBodyById(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo getCheckBody(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getCheckBody(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo getCheckBodymethod(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.getCheckBodymethod(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo combinedDetail(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.combinedDetail(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo patientAdviceState(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.patientAdviceState(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    public ModelVo queryAdviceHistory(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.queryAdviceHistory(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }
    
    @SuppressWarnings("unchecked")
	public ModelVo doctorAdviceHistory(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list =null;
    	try {
			
		
    	if("1".equals(map.get("lMode").toString())){
    		Map m = doctorAdviceInfoDao.getVAF01A(map);
    		if(m!=null){
    			map.put("CBMid", m.get("CBMid").toString());
    			map.put("lVAF01A", m.get("lVAF01A").toString());
    		}
    		
    	}else{
    		map.put("CBMid", map.get("lCBM01").toString());
    	}
    	Object adate = map.get("adate");
    	if(adate==null||"".equals(adate.toString())){
    		map.put("adate", DateUtils.getDateString(new Date()));
    	}
    	map.put("para80g", doctorAdviceInfoDao.para80g());
    	 list = doctorAdviceInfoDao.getAdviceHistory(map);
    	} catch (Exception e) {
    		e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
    	mo.setList(list);
    	mo.setRows(list);
    	mo.setResult(StaticKeys.OH_SUCCESS);
    	return mo;
    }
    public ModelVo queryGuard(Map map)throws Exception{
    	ModelVo mo = new ModelVo();
    	List list = null;
		try {
			list = doctorAdviceInfoDao.queryGuard(map);
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		
		mo.setList(list);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(list);
		return mo;
    }

    public ModelVo sendadvicehistory_vaf(HashMap hs)
    {
        ModelVo mo = new ModelVo();
		String date1 = MapUtils.getString(hs,"date1");
		String date2 = MapUtils.getString(hs,"date2");
		int range = DateUtil.timeRange(date1,date2);
		List list = new ArrayList();
        try {
        		if(range==0){
					list = doctorAdviceInfoDao.sendadvicehistory_vaf(hs);
				}else{
					list = doctorAdviceInfoDao.sendadvicehistory_vaf1(hs);
				}
                mo.setList(list);
                mo.setResult(StaticKeys.OH_SUCCESS);
                return mo;
        } catch (Exception e) {
            e.printStackTrace();
            mo.setResult(StaticKeys.OH_FALSE);
            return mo;
        }
    }

    public ModelVo queryJiaohaolist(HashMap map)
    {
        ModelVo mv = new ModelVo();
        try
        {
            List list = doctorAdviceInfoDao.queryJiaohaolist(map);
            mv.setList(list);
            mv.setResult(StaticKeys.OH_SUCCESS);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            mv.setResult(StaticKeys.OH_FALSE);
        }
        return mv;
    }

    public ModelVo queryBbxByBdt(HashMap params)
    {
        ModelVo mv = new ModelVo();
        try
        {
            List<Map<String, Object>> map = doctorAdviceInfoDao.queryForList("DoctorAdvice.queryBbxByBdt", params);
            mv.setList(map);
            mv.setResult(StaticKeys.OH_SUCCESS);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            mv.setResult(StaticKeys.OH_FALSE);
        }
        return mv;
    }

    public ModelVo checkPatientDoctorAdviceUnSend(HashMap hs)
    {
        ModelVo mv = new ModelVo();
        try
        {
            List<Map<String, Object>> map = doctorAdviceInfoDao.queryForList("DoctorAdvice.checkPatientDoctorAdviceUnSend", hs);
            mv.setList(map);
            mv.setResult(StaticKeys.OH_SUCCESS);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            mv.setResult(StaticKeys.OH_FALSE);
        }
        return mv;
    }

    public ModelVo wanchengjiezhen(HashMap hs)
    {
        ModelVo mv = new ModelVo();
        try
        {
            doctorAdviceInfoDao.update("DoctorAdvice.wanchengjiezhen", hs);
            mv.setResult(StaticKeys.OH_SUCCESS);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            mv.setResult(StaticKeys.OH_FALSE);
        }
        return mv;
    }
    public ModelVo quxiaowanzhen(HashMap hs)
    {
        ModelVo mv = new ModelVo();
        try
        {
            doctorAdviceInfoDao.update("DoctorAdvice.quxiaowanzhen", hs);
            mv.setResult(StaticKeys.OH_SUCCESS);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            mv.setResult(StaticKeys.OH_FALSE);
        }
        return mv;
    }
}
